#!/bin/bash
VERSION=1.0.0
NAME=yfhub/usercenter
REGISTRY=docker.hgpark.cn
IMAGE_NAME=${REGISTRY}/${NAME}:${VERSION}
CONTAINER_NAME=usercenter

docker login ${REGISTRY}

docker rm -vf ${CONTAINER_NAME}
docker rmi ${IMAGE_NAME}
docker build -f src/main/docker/Dockerfile.jvm -t ${IMAGE_NAME} .

docker push ${IMAGE_NAME}